/// @tags: Enumerate
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

int main() {
  int n, m, c, C = 0, M = 0;
  long long ans = 0;
  cin >> n >> m >> c;
  for (int i = 0; i <= c + 5; i++) {
    long long d = (n - (long long)i * m) / c;
    if (d < 0) d = 0;
    for (int j = std::max(d - 2, 0ll); j <= d + 2; j++) {
      if (std::abs(j * c + i * m - n) < std::abs(ans - n)) {
        ans = j * c + i * m;
        M = i;
        C = j;
      }
    }
  }
  cout << M << ' ' << C;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("A. Boris and Berta.in", "r", stdin);
  freopen("A. Boris and Berta.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
